<template>
  <div class="chat-list">
    <div class="chat-con" v-for="(element,index) in childData">
      <div class="chat-user clearfix">
        <img :src="element.head_pic" alt="">
        <p>{{element.label}}</p>
        <div class="chat-right">
          小时光
        </div>
      </div>
      <div class="chat-title">
        {{element.title}}
      </div>
      <div class="chat-icon clearfix">
        <div>
          <i class="icon iconfont">&#xe634;</i>
          <span>{{element.like}}</span>
        </div>
        <div>
          <i class="icon iconfont">&#xe63e;</i>
          <span>{{element.message}}</span>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'ChatList',
  components: {},
  props: {
    childData: {
      type: Array,
      default: function() {
        return []
      }
    }
  }
}

</script>
<style scoped>
.chat-list {
/*  padding: 0 0.15rem;*/
  background-color: #f5f5f5;
  /*width: 3.5rem;*/
  width: 100%;
}

.chat-con {
  background-color: #fff;
  border-bottom: 1px solid #E0E0E0;
  margin-bottom: 0.2rem
}

.chat-user {
  padding-left: 0.15rem;
  /* margin-top: 0.25rem;*/
  position: relative;
  border-bottom: 1px solid #E0E0E0;
  padding-bottom: 0.15rem;
  margin-bottom: 0.2rem;
  background: block;
  padding-top: 0.15rem;

}

.chat-user img {
  width: 0.5rem;
  height: 0.5rem;
  float: left;
}

.chat-user p {
  line-height: 0.5rem;
  padding-left: 0.1rem;
  color: #999;
}

.chat-right {
  width: 0.8rem;
  height: 0.2rem;
  position: absolute;
  right: 0;
  top: 0.2rem;
  margin-right: 0.1rem;
  border: 1px solid #68B92E;
  border-radius: 25px;
  padding: 0.05rem;
  text-align: center;
  color: #68B92E;
}

.chat-title {
  padding: 0.15rem;
  margin-top: 0.1rem;
  letter-spacing: 0.02rem;
  line-height: 0.28rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid #E0E0E0;
}

.chat-icon>div {
  padding: 0.1rem;
  float: left;
  color: #CCCCCC;
  display: inline-block;
}

.chat-icon i {
  font-size: 0.2rem;
  color: #CCCCCC;
}

</style>
